package oop4;

/**
 * @author oldliu
 * @since 1.0
 */
public class Circle {
    private double radius;
    public final static double pi=3.14;

    public static void printpi(){
        System.out.println("圆周率是："+pi);
        //System.out.println("半径是"+radius);
       // double d=calcArea();错误
    }

    //
    public Circle(double d){
        this.radius=d;
    }
    public double calcArea(){
        printpi();
        return pi*radius*radius;
    }

    public double getRadius() {
        return radius;
    }
}
